package com.itlaobing.demo.dao.impl;

import com.itlaobing.demo.dao.UserinfoDao;
import com.itlaobing.demo.model.UserinfoModel;
import com.itlaobing.demo.util.DBHelper;

/**
 * @Classname UserinfoDaoImpl
 * @Description TODO()
 * @Date 2020/11/10 0010 11:57
 * @Author by Administrator
 * @Version v1.0
 */
public class UserinfoDaoImpl implements UserinfoDao {

    private DBHelper db = new DBHelper();

    @Override
    public UserinfoModel selectByUsernameAndPassword(String username, String password) {
        String sql = "select `id`, `username`, `password`, `name`, `imgUrl` from userinfo where username = ? and password = ?";
        return db.executeQuery(sql, UserinfoModel.class, username, password);
    }
}
